package com.kami.leetcode.code_202301;

/**
 * @Description LeetCode
 * @Author zhenhuiguo
 * @Date 2023/1/8 10:46
 **/
public class LeetCode {
    /**
     * @Description 2185. 统计包含给定前缀的字符串
     * @Date 2023/1/8 10:46
     **/
    public int prefixCount(String[] words, String pref) {
        int cnt = 0;
        for (String word:words) {
            if (word.startsWith(pref)) {
                cnt++;
            }

        }
        return cnt;
    }

}
